package com.server.pinggu.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import com.server.pinggu.mapper.SenSetMapper;
import com.server.pinggu.domain.SenSet;
import com.server.pinggu.service.ISenSetService;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ltao
 * @date 2022-10-23
 */
@Service
public class SenSetServiceImpl extends ServiceImpl<SenSetMapper, SenSet> implements ISenSetService {

    @Override
    public List<SenSet> queryList(SenSet senSet) {
        LambdaQueryWrapper<SenSet> lqw = Wrappers.lambdaQuery();
        if (StringUtils.isNotBlank(senSet.getName())){
            lqw.like(SenSet::getName ,senSet.getName());
        }
        if (StringUtils.isNotBlank(senSet.getTag())){
            lqw.eq(SenSet::getTag ,senSet.getTag());
        }
        if (StringUtils.isNotBlank(senSet.getVal())){
            lqw.eq(SenSet::getVal ,senSet.getVal());
        }
        if (StringUtils.isNotBlank(senSet.getLang())){
            lqw.eq(SenSet::getLang ,senSet.getLang());
        }
        return this.list(lqw);
    }
}